<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.lmpop.trade.ti_newscomment.*" %>
<%@ page import="com.lmpop.trade.ti_news.*"%> 
<%@page import="com.lmpop.trade.ti_channel.*" %> 
<%@page import="java.util.*" %>
<html>
  <head>
    
    <title>修改资讯评论</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/engine.js'></script>
		<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/util.js'></script>
		<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/Ti_channelInfo.js'></script>
		 <script type="text/javascript" src="news.js"></script>
</head>

<body>

  <% 
  String se_user_id="";	
	if( session.getAttribute("session_user_id") != null )
	{
		se_user_id = session.getAttribute("session_user_id").toString();
	}
    Ti_newsInfo newsinfo = new Ti_newsInfo();
  	String info_id="";
  	if(request.getParameter("info_id")!=null) info_id = request.getParameter("info_id");
  	Ti_newscommentInfo ti_newscommentInfo = new Ti_newscommentInfo();
  	List list = ti_newscommentInfo.getListByPk(info_id);
  	Hashtable map = new Hashtable();
  	if(list!=null && list.size()>0) map = (Hashtable)list.get(0);
  	
  	String news_id="",ch_id="",in_date="",content="",user_id="",up_num="",title="",down_num="",user_name="";
  	if(map.get("ch_id")!=null) ch_id = map.get("ch_id").toString();
  	if(map.get("in_date")!=null) in_date = map.get("in_date").toString();
  	if(map.get("content")!=null) content = map.get("content").toString();
  	if(map.get("user_id")!=null) user_id = map.get("user_id").toString();
	if(map.get("user_name")!=null) user_name = map.get("user_name").toString();
  	if(map.get("up_num")!=null) up_num = map.get("up_num").toString();
  	if(map.get("down_num")!=null) down_num = map.get("down_num").toString();
	if(map.get("news_id")!=null) {
		news_id = map.get("news_id").toString();
		title=newsinfo.gettitle(news_id);
		}
    Ti_channelInfo channelinfo = new Ti_channelInfo();
   String selecttree = channelinfo.getChannelTreeByTLevel("000000000000000");
   
	  String select = channelinfo.getSelchannelByTLevel("1");
	   
	  String output = "";		  
		 output= channelinfo.getChName(ch_id);
		 
		 
		 String g_title = "";
	if(request.getParameter("title")!=null && !request.getParameter("title").equals("")){
		g_title = request.getParameter("title");
	}
   String g_ch_id = "";
	if(request.getParameter("class_attr")!=null && !request.getParameter("class_attr").equals("")){
		g_ch_id = request.getParameter("class_attr");

	}
	String g_news_id = "";
	if(request.getParameter("news_idx")!=null && !request.getParameter("news_idx").equals("")){
		g_news_id = request.getParameter("news_idx");
	}
  String start_date = "";
  if(request.getParameter("start_date")!=null && !request.getParameter("start_date").equals("")){
	start_date = request.getParameter("start_date");
	}
	String end_date = "";
	if(request.getParameter("end_date")!=null && !request.getParameter("end_date").equals("")){
	end_date = request.getParameter("end_date");
	}
	String iStart = "0";
	if(request.getParameter("iStart")!=null) iStart = request.getParameter("iStart");
   String para ="/program/admin/newscomment/index.jsp?class_attr="+g_ch_id+"&title="+g_title+"&news_idx="+g_news_id+"&iStart="+Integer.parseInt(iStart);		 
  %>
	
	<h1>修改资讯评论</h1>
	
	<form action="/doTradeReg.do" method="post" name="addForm">
	<input name="news_id" id="news_id" value="<%=news_id %>" type="hidden"/>
	<input name="user_id" id="user_id" value="<%=user_id %>" type="hidden"/>
	<input name="down_num" id="down_num" value="<%=down_num %>" type="hidden"/>
	<input name="in_date" id="in_date" value="<%=in_date %>" type="hidden"/>
	<input name="up_num" id="up_num" value="<%=up_num %>" type="hidden"/>
	
	<table width="100%" cellpadding="0" cellspacing="1" border="0" class="listtab">
		
		<tr>	
			<td align="right" width="5%">
				资讯名称:
			</td>
			<td colspan="3"><%=title %></td>
		</tr>
		

		
		<tr>
		<td align="right" width="5%">
				评论人:
			</td>
			<td width="10%"><%=user_name%></td>
		   <td align="right" width="5%">
				评论时间:
			</td>
			<td width="10%"><%=in_date %></td>
		</tr>
		<tr>
		
		<tr>
			<td align="right" width="5%">
				评论内容<font color="red">*</font>
			</td>
			<td colspan="3">
			<textarea name="content" id="content"><%=content%></textarea>
			<script type="text/javascript" src="/program/plugins/ckeditor/ckeditor.js"></script>
			<script type="text/javascript">
				CKEDITOR.replace('content');
			</script>
			</td>
		</tr>	
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="bpm_id" value="1196" />
	  			<input type="hidden" name="info_id" value="<%=info_id %>" />
				<input type="hidden" name="jumpurl" value="<%=para%>" />
				<input type="submit" class="buttoncss" name="tradeSub" value="提交" onClick="return formSub()" />&nbsp;&nbsp;
				<input type="button" class="buttoncss" name="tradeRut" value="返回" onclick="window.location.href='<%=para%>';"/>
			</td>
		</tr>
	</table>
	</form>
</body>

</html>
